﻿using System.Collections.Generic;
using System.Linq;

namespace KinectLibrary
{
    public class Body
    {
        /// <summary>
        /// Returns a vector value which represents an articulation that is not on the body.
        /// </summary>
        public static readonly Vector ArticulationNotFound = Vector.Thousand;

        private readonly List<Articulation> points;

        public Body(IEnumerable<Articulation> points)
        {
            this.points = new List<Articulation>(12);
            this.points.AddRange(points);
            InitalizeArticulationList();
        }

        public Body()
        {
            points = new List<Articulation>(12);
            InitalizeArticulationList();
        }

        private void InitalizeArticulationList()
        {
            for (int i = points.Count; i < 12; i++)
                points.Add(new Articulation {Position = ArticulationNotFound});
        }        
    }
}